import Vue from 'vue'
import VueRouter from 'vue-router'
import Collect from '../views/Collect'
import category from '@/views/category'
import hotlist from '@/views/hotlist'
import column from '@/views/column'
import homepage from '@/views/homepage'
import list1 from '@/views/homepage/list1'
import list2 from '@/views/homepage/list2'
import list3 from '@/views/homepage/list3'
import list4 from '@/views/homepage/list4'
import c from '@/views/C'
import s from '@/views/Search/s'
Vue.use(VueRouter)

const routes = [
  { // 分类页面
    path: '/tab/:id',
    component: category
  },
  { // 潮流精选点击后页面
    path: '/category/:hotlistid',
    component: hotlist
  },
  {
    path: '/collect',
    component: Collect
  },
  {
    path: '/s',
    component: s
  },
  { // 分类页面点击查看全部
    path: '/column/:columnid',
    component: column
  },
  {
    path: '/homepage',
    component: homepage,
    children: [

    ]
  },
  {
    path: '/',
    redirect: '/homepage'
  },

  {

    path: '/c/:detaiId',
    component: c
  },
  {
    path: '/list1',
    component: list1
  },
  {
    path: '/list2',
    component: list2
  },
  {
    path: '/list3',
    component: list3
  },
  {
    path: '/list4',
    component: list4
  },
  {
    path: '/search',
    component: () =>
      import('@/views/Search')
  },
  {
    path: '/s/:InputValue',
    component: () =>
      import('@/views/Search/s')
  }
]

const router = new VueRouter({
  mode: 'hash',
  base: process.env.BASE_URL,
  routes
})

export default router
